package com.dmx.platform.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TOrder entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_order")
public class TOrder implements java.io.Serializable {

	// Fields

	public static Integer STATUS_NEW=1;
	public static Integer STATUS_ALLOCATED=2;
	public static Integer STATUS_CANCELED=3;
	public static Integer STATUS_REFUSED=4;
	public static Integer STATUS_CONFIRMED=5;
	public static Integer STATUS_INVALID=6;
	
	private Integer id;
	private Long orderNum;
	private Integer baseId;
	private Integer detalId;
	private String orderName;
	private Integer units;
	private Integer price;
	private Integer userId;
	private String userName;
	private String userPhone;
	private Integer timeSegment;
	private Date startTime;
	private Date endTime;
	private Date recordTime;
	
	private Integer status;
	private String secretKey;
	
	private String allocateRoom;
	private Date allocateTime;
	private String allocateOpt;
	
	private Date confirmTime;	

	// Constructors

	/** default constructor */
	public TOrder() {
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "order_num", precision = 10, scale = 0)
	public Long getOrderNum() {
		return this.orderNum;
	}

	public void setOrderNum(Long orderNum) {
		this.orderNum = orderNum;
	}

	@Column(name = "base_id")
	public Integer getBaseId() {
		return this.baseId;
	}

	public void setBaseId(Integer baseId) {
		this.baseId = baseId;
	}

	@Column(name = "units")
	public Integer getUnits() {
		return this.units;
	}

	public void setUnits(Integer units) {
		this.units = units;
	}

	@Column(name = "price")
	public Integer getPrice() {
		return this.price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}

	@Column(name = "user_id")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "user_name")
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "user_phone")
	public String getUserPhone() {
		return this.userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start_time", length = 0)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "end_time", length = 0)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "record_time", length = 0)
	public Date getRecordTime() {
		return this.recordTime;
	}

	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "secret_key", length = 30)
	public String getSecretKey() {
		return this.secretKey;
	}

	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}

	@Column(name = "detail_id")
	public Integer getDetalId() {
		return detalId;
	}

	public void setDetalId(Integer detalId) {
		this.detalId = detalId;
	}

	@Column(name = "order_name")
	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}

	@Column(name = "time_segment")
	public Integer getTimeSegment() {
		return timeSegment;
	}

	public void setTimeSegment(Integer timeSegment) {
		this.timeSegment = timeSegment;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "confirm_time", length = 0)
	public Date getConfirmTime() {
		return confirmTime;
	}

	public void setConfirmTime(Date confirmTime) {
		this.confirmTime = confirmTime;
	}



	@Column(name = "allocate_room")
	public String getAllocateRoom() {
		return allocateRoom;
	}

	public void setAllocateRoom(String allocateRoom) {
		this.allocateRoom = allocateRoom;
	}

	@Column(name = "allocate_time")
	public Date getAllocateTime() {
		return allocateTime;
	}

	public void setAllocateTime(Date allocateTime) {
		this.allocateTime = allocateTime;
	}

	@Column(name = "allocate_opt")
	public String getAllocateOpt() {
		return allocateOpt;
	}

	public void setAllocateOpt(String allocateOpt) {
		this.allocateOpt = allocateOpt;
	}

}